<?php
/**
 * Created by PhpStorm.
 * User: lance
 * Date: 11/28/17
 * Time: 1:42 PM
 */

/**
 * 贷款类型管理
 */
namespace app\customer\admin;


use app\admin\controller\Admin;
use app\common\builder\ZBuilder;
use think\Db;
class LoanType extends Admin
{
    /**
     * 贷款类型列表
     */
    function _list(){
        $a_dataList = Db::name('customer_loan_type')->paginate();
        return ZBuilder::make('table')
            ->hideCheckbox()
            ->addColumns([
                ['id','ID'],
                ['name','贷款类型','text.edit'],
                ['status','开启状态','switch']
            ])
            ->addValidate('LoanType','name')
            ->autoAdd([
                ['text','name','贷款类型']
            ],'',true)
            ->setRowList($a_dataList)
            ->fetch();
    }
}